﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Style TargetType="{x:Type TabControl}" x:Key="mainTabControl">
        <Setter Property="TabStripPlacement" Value="Left" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabControl}">
                    <Grid Name="PART_Grid" KeyboardNavigation.TabNavigation="Local">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>

                        <TabPanel IsItemsHost="True"
                                  Grid.Column="0"
                                  Name="HeaderPanel"
                                  Margin="0"
                                  KeyboardNavigation.TabIndex="1"
                                  Background="{DynamicResource DarkColor1}" />

                        <Border x:Name="Border"
                                Grid.Column="1"
                                BorderThickness="0"
                                KeyboardNavigation.TabNavigation="Local"
                                KeyboardNavigation.DirectionalNavigation="Contained"
                                KeyboardNavigation.TabIndex="2">
                            <ContentPresenter x:Name="PART_SelectedContentHost"
                                                  Margin="0"
                                                  ContentSource="SelectedContent" />
                        </Border>

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>

    </Style>

    <Style TargetType="{x:Type TabItem}" x:Key="mainTabItems">
        <Setter Property="Width" Value="150" />
        <Setter Property="Height" Value="50" />

        <Setter Property="TextElement.Foreground" Value="{DynamicResource Gray1}" />
        <Setter Property="TextElement.FontSize" Value="18" />
        <Setter Property="TextElement.FontFamily" Value="/Fonts/OpenSans-Regular.ttf#Open Sans" />

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <Border x:Name="PART_BORDER" 
                            BorderThickness="0"
                            BorderBrush="{DynamicResource BG1}"
                            Background="{DynamicResource BG1}" 
                            >
                        <ContentPresenter x:Name="PART_CONTENT"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center"
                            ContentSource="Header"
                            RecognizesAccessKey="False" SnapsToDevicePixels="True" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="True">
                            <Setter TargetName="PART_BORDER" Property="Background" Value="{DynamicResource Light3_66}" />
                            <Setter TargetName="PART_CONTENT" Property="TextElement.Foreground" Value="White" />
                        </Trigger>

                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="PART_BORDER" Property="Background" Value="{DynamicResource Light3_33}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <Style TargetType="{x:Type TabItem}" x:Key="LocationTabItem">
        <Setter Property="Width" Value="160" />
        <Setter Property="Height" Value="80" />

        <Setter Property="TextElement.Foreground" Value="{DynamicResource Gray1}" />
        <Setter Property="TextElement.FontSize" Value="14" />
        <Setter Property="TextElement.FontFamily" Value="/Fonts/OpenSans-Regular.ttf#Open Sans" />

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <Grid x:Name="PART_BORDER" >
                        <StackPanel Orientation="Vertical" HorizontalAlignment="Center" Margin="0,7,0,5">
                            <Image Name="PART_IMG" Source="/Images/location-icon_dark-48.png" Margin="0,0,0,3" Width="32" Height="32" />
                            <ContentPresenter x:Name="PART_CONTENT"
                               VerticalAlignment="Center"
                               HorizontalAlignment="Center"
                               ContentSource="Header"
                               RecognizesAccessKey="False" SnapsToDevicePixels="True" />
                        </StackPanel>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="True" />
                            </MultiTrigger.Conditions>
                            <MultiTrigger.Setters>
                                <Setter TargetName="PART_BORDER" Property="Background" Value="{DynamicResource Light3_66}" />
                                <Setter TargetName="PART_CONTENT" Property="TextElement.Foreground" Value="White" />
                                <Setter TargetName="PART_IMG" Property="Source" Value="/Images/location-icon-48.png" />
                            </MultiTrigger.Setters>
                        </MultiTrigger>

                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="True" />
                                <Condition Property="IsSelected" Value="False" />
                            </MultiTrigger.Conditions>
                            <MultiTrigger.Setters>
                                <Setter TargetName="PART_CONTENT" Property="TextElement.Foreground" Value="White" />
                                <Setter TargetName="PART_IMG" Property="Source" Value="/Images/location-icon-48.png" />
                                <!--<Setter TargetName="PART_BORDER" Property="Background" Value="{DynamicResource Light3_33}" />-->
                            </MultiTrigger.Setters>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <Style TargetType="{x:Type TabItem}" x:Key="BookTabItem">
        <Setter Property="Width" Value="160" />
        <Setter Property="Height" Value="80" />

        <Setter Property="TextElement.Foreground" Value="{DynamicResource Gray1}" />
        <Setter Property="TextElement.FontSize" Value="14" />
        <Setter Property="TextElement.FontFamily" Value="/Fonts/OpenSans-Regular.ttf#Open Sans" />

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <Grid x:Name="PART_BORDER" >
                        <StackPanel Orientation="Vertical" HorizontalAlignment="Center" Margin="0,7,0,5">
                            <Image Name="PART_IMG" Source="/Images/book-icon_dark-48.png" Margin="0,0,0,3" Width="32" Height="32" />
                            <ContentPresenter x:Name="PART_CONTENT"
                               VerticalAlignment="Center"
                               HorizontalAlignment="Center"
                               ContentSource="Header"
                               RecognizesAccessKey="False" SnapsToDevicePixels="True" />
                        </StackPanel>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="True" />
                            </MultiTrigger.Conditions>
                            <MultiTrigger.Setters>
                                <Setter TargetName="PART_BORDER" Property="Background" Value="{DynamicResource Light3_66}" />
                                <Setter TargetName="PART_CONTENT" Property="TextElement.Foreground" Value="White" />
                                <Setter TargetName="PART_IMG" Property="Source" Value="/Images/book-icon-48.png" />
                            </MultiTrigger.Setters>
                        </MultiTrigger>

                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="True" />
                                <Condition Property="IsSelected" Value="False" />
                            </MultiTrigger.Conditions>
                            <MultiTrigger.Setters>
                                <!--<Setter TargetName="PART_BORDER" Property="Background" Value="{DynamicResource Light3_33}" />-->
                                <Setter TargetName="PART_CONTENT" Property="TextElement.Foreground" Value="White" />
                                <Setter TargetName="PART_IMG" Property="Source" Value="/Images/book-icon-48.png" />
                            </MultiTrigger.Setters>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type TabItem}" x:Key="SettingTabItem">
        <Setter Property="Width" Value="160" />
        <Setter Property="Height" Value="80" />

        <Setter Property="TextElement.Foreground" Value="{DynamicResource Gray1}" />
        <Setter Property="TextElement.FontSize" Value="14" />
        <Setter Property="TextElement.FontFamily" Value="/Fonts/OpenSans-Regular.ttf#Open Sans" />

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <Grid x:Name="PART_BORDER" >
                        <StackPanel Orientation="Vertical" HorizontalAlignment="Center" Margin="0,7,0,5">
                            <Image Name="PART_IMG" Source="/Images/control-panel-icon_dark-48.png" Margin="0,0,0,5" Width="32" Height="32" />
                            <ContentPresenter x:Name="PART_CONTENT"
                               VerticalAlignment="Center"
                               HorizontalAlignment="Center"
                               ContentSource="Header"
                               RecognizesAccessKey="False" SnapsToDevicePixels="True" />
                        </StackPanel>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="True" />
                            </MultiTrigger.Conditions>
                            <MultiTrigger.Setters>
                                <Setter TargetName="PART_BORDER" Property="Background" Value="{DynamicResource Light3_66}" />
                                <Setter TargetName="PART_CONTENT" Property="TextElement.Foreground" Value="White" />
                                <Setter TargetName="PART_IMG" Property="Source" Value="/Images/control-panel-icon-48.png" />
                            </MultiTrigger.Setters>
                        </MultiTrigger>

                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsMouseOver" Value="True" />
                                <Condition Property="IsSelected" Value="False" />
                            </MultiTrigger.Conditions>
                            <MultiTrigger.Setters>
                                <Setter TargetName="PART_CONTENT" Property="TextElement.Foreground" Value="White" />
                                <Setter TargetName="PART_IMG" Property="Source" Value="/Images/control-panel-icon-48.png" />
                                <!--<Setter TargetName="PART_BORDER" Property="Background" Value="{DynamicResource Light3_33}" />-->
                            </MultiTrigger.Setters>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


</ResourceDictionary>